<div class="page-title area-col-white detail-page-title">
   
    <nz-breadcrumb nzSeparator=" ">
      <nz-breadcrumb-item>
        <a [routerLink]="['/layer']" class="breadcrumb_link">
          <i nz-icon nzType="arrow-left" nzTheme="outline" class="breadcrumb_i"></i>
        </a>
      </nz-breadcrumb-item>
      <nz-breadcrumb-item>
        <span class="head-05">{{data?.layerName || ''}}</span>
      </nz-breadcrumb-item>
    </nz-breadcrumb>
  
    <!-- <div class="page-title-opt pull-right to_top_btn">
      <button nz-button (click)="createFunction(data.id)">创建函数
      </button>
      <button nz-button (click)="editApplication(data)">编辑
      </button>
      <button nz-button (click)="deleteApplication(data)">删除
      </button>
    </div> -->
  </div>
  <nz-spin [nzSpinning]="isLoading">
    <div class="form-fieldset form-horizontal form-align-left mb8">
      <fieldset>
        <legend>
        层详细信息
        </legend>
        <div class="form-static" nz-row>
          <div nz-col nzSpan="12">
            <div class="form-group">
              <label class="control-label col-em-7">层名称：</label>
              <div class="col-em-offset-7">
                <p class="form-control-static">{{data?.layerName}}</p>
              </div>
            </div>
            <div class="form-group">
              <label class="control-label col-em-7">所属地域：</label>
              <div class="col-em-offset-7">
                <p class="form-control-static">{{regionName || '--'}}</p>
              </div>
            </div>
            
          </div>
        </div>
      </fieldset>
    </div>
  </nz-spin>
  <div class="table-top" style="padding-top: 0.05rem;">
    <div class="table-operations clearfix">
      <div class="pull-left">
        <button nz-button nzType="primary" class="btn-add" (click)="createVersion(data.layerId)">
          <i class="fas fa-plus"></i>新建版本
        </button>
      </div>
      <div class="pull-right"></div>
    </div>
  </div>

  <div class="padding-content area-col-white">
    
    <fieldset>
    <legend style="border: none;">
        已发布版本
        <nzi-help [options]="{'title': '该层所有版本信息列表。删除所有版本后，该层会被自动删除。'}"> </nzi-help>
    </legend>
    </fieldset>
    <div style="padding-bottom:0.20rem;">
      <nz-table #nzTable [nzData]="versionData" [nzTotal]="totalCount" [nzShowTotal]="rangeTemplate"
        [(nzPageSize)]="pageSize" [(nzPageIndex)]="pageNo" nzShowSizeChanger [nzLoading]="isLoading"
        [nzFrontPagination]="false" [nzNoResult]="noResult" (nzPageIndexChange)="getVersionList()"
        (nzPageSizeChange)="getVersionList()" [nzShowPagination]="totalCount>10" class="table-fixed">
        <thead>
          <tr>
            <th>版本</th>
            <th nzWidth="2rem">描述</th>
            <th nzWidth="2.5rem">运行环境</th>
            <th nzWidth="2rem">创建时间</th>
            <th nzWidth="1.6rem">操作</th>
          </tr>
        </thead>
        <tbody>
          <tr *ngFor="let data of nzTable.data; let i = index;">
            <td nz-popover [nzContent]="data?.version">{{data?.version}}</td>
            <td nz-popover [nzContent]="data?.description" nzPlacement="right"><p>{{data?.description || '--'}}</p></td>
            <!-- <td>{{data?.runtimes}}</td> -->
            <td>
              <div class="lay-tag" *ngFor="let runtimes of data.runtimes; ">
								{{runtimes}}
							</div>
            </td>
            <td>{{(data.createTime| date: 'yyyy-MM-dd HH:mm:ss') || '--'}}</td>
            <td class="table-opt">
              <a (click)="downLoad(data)">下载程序包</a>
              <a (click)="deleteVersion(data)">删除</a>
            </td>
          </tr>
        </tbody>
        <ng-template #noResult>
          <!-- <table-no-result-search></table-no-result-search> -->
          <table-no-result-add title="抱歉，你还没有层！" action="去创建" (actionClick)="createVersion()" >
          </table-no-result-add>
  
        </ng-template>
        <ng-template #rangeTemplate let-range="range" let-total>
          共{{totalCount}}条
        </ng-template>
      </nz-table>
    </div>
  </div>


 
  
  